package cn.tedu.submarine;

import javax.swing.*;

//水雷潜艇
public class  MineSubmarine extends SeaObject implements EnemyScore{

    //MineSubmarine的构造方法
    public MineSubmarine(){
        super(63,19);
    }




    //重写move()移动
    public void move(){
        x+=speed;//x+(向右边移动)

    }



    //重写getImage()获取图片
    public ImageIcon getImage(){
        return Images.minesubm;
    }

    public Mine shotMine(){
//        int x = this.x+this.width;
//        int y = this.y-5;
//        return new Mine(x,y);
        return new Mine(this.x+this.width,this.y-5);
    }
    //重写得分
    public int getScore(){
        return 10;
    }
}
